<%@ page contentType="text/html;charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>客户信息</title>
<%@ include file="/common/meta.jsp"%>
<%@ include file="/common/import.jsp"%>


<script type="text/javascript">
	var url = "${ctx}/crm/saveRelat.action";
	$(function() {
		$('#myForm').form({
			url : url,
			onSubmit : function() {
				return $(this).form('validate');
			},
			success : function(data) {
				var oTxt = jQuery.parseJSON(data);
				var message = oTxt.msg;
				var sucessflag = oTxt.flag;
				if (sucessflag == 'T') {
					$.messager.alert('提示', message, 'info', function() {
						cancel();
						window.parent.reload();
					});
				} else {
					$.messager.alert('提交结果', message, 'error');
				}
			}
		});
	});

	function doSubmit() {//提交按钮

		if ($("#myForm").form('validate')) {
			$('#myForm').submit();
		}
	}

	//取消
	function cancel() {
		window.parent.closeWin();
	}
</script>
</head>
<body>
	<div style="padding:0px;background:#fff;border:0px;">

		<form id="myForm" name="myForm" method="post">
			<input type="hidden" name="id" value="" /> <input type="hidden"
				name="customerId" id="customerId" value="${customer.customerId }" />
			<br />
			<table align="center" class=info cellspacing=1 cellpadding=0
				style="margin-top:0px;">
				<tr>
					<th width="80">登录名称</th>
					<td><input type="text" class="easyui-validatebox"
						id="customerTypeCode" name="customerTypeCode" size="30"
						value="${customer.uctUserename}" readonly="readonly"/>
					</td>
				</tr>
				<tr>
					<th width="80">客户名称</th>
					<td><input type="text" class="easyui-validatebox"
						id="customerTypeCode" name="customerTypeCode" size="30"
						value="${customer.customerName}" readonly="readonly"/>
					</td>
				</tr>
				<tr>
					<th>客户类别</th>
					<td><select id="customerTypeId" name="customerTypeId" class="easyui-validatebox" >
							<option value="">--选择类别--</option>
							<c:forEach var="tInfo" items="${typeList }">
								<option value="${tInfo.customerTypeId }">${tInfo.customerTypeName }</option>
							</c:forEach>
					</select></td>
				</tr>
			</table>
			<center>
				<a class="easyui-linkbutton" id="saveYes" iconCls="icon-add"
					onClick="doSubmit();">保存</a>
			</center>

		</form>
	</div>

</body>
</html>
